3.2.95 \(\int \frac {\cot (c+d x)}{(a+b \sin (c+d x))^3} \, dx\) [195]

Optimal. Leaf size=75 \[ \frac {\log (\sin (c+d x))}{a^3 d}-\frac {\log (a+b \sin (c+d x))}{a^3 d}+\frac {1}{2 a d (a+b \sin (c+d x))^2}+\frac {1}{a^2 d (a+b \sin (c+d x))} \]

[Out]

ln(sin(d*x+c))/a^3/d-ln(a+b*sin(d*x+c))/a^3/d+1/2/a/d/(a+b*sin(d*x+c))^2+1/a^2/d/(a+b*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2800, 46} \begin {gather*} -\frac {\log (a+b \sin (c+d x))}{a^3 d}+\frac {\log (\sin (c+d x))}{a^3 d}+\frac {1}{a^2 d (a+b \sin (c+d x))}+\frac {1}{2 a d (a+b \sin (c+d x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + b*Sin[c + d*x])^3,x]

[Out]

Log[Sin[c + d*x]]/(a^3*d) - Log[a + b*Sin[c + d*x]]/(a^3*d) + 1/(2*a*d*(a + b*Sin[c + d*x])^2) + 1/(a^2*d*(a +
 b*Sin[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot (c+d x)}{(a+b \sin (c+d x))^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x (a+x)^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a^3 x}-\frac {1}{a (a+x)^3}-\frac {1}{a^2 (a+x)^2}-\frac {1}{a^3 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\log (\sin (c+d x))}{a^3 d}-\frac {\log (a+b \sin (c+d x))}{a^3 d}+\frac {1}{2 a d (a+b \sin (c+d x))^2}+\frac {1}{a^2 d (a+b \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 60, normalized size = 0.80 \begin {gather*} \frac {2 \log (\sin (c+d x))-2 \log (a+b \sin (c+d x))+\frac {a (3 a+2 b \sin (c+d x))}{(a+b \sin (c+d x))^2}}{2 a^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + b*Sin[c + d*x])^3,x]

[Out]

(2*Log[Sin[c + d*x]] - 2*Log[a + b*Sin[c + d*x]] + (a*(3*a + 2*b*Sin[c + d*x]))/(a + b*Sin[c + d*x])^2)/(2*a^3
*d)

________________________________________________________________________________________

Maple [A]
time = 0.28, size = 66, normalized size = 0.88

method result size
derivativedivides \(\frac {-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}+\frac {1}{a^{2} \left (a +b \sin \left (d x +c \right )\right )}+\frac {1}{2 a \left (a +b \sin \left (d x +c \right )\right )^{2}}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a^{3}}}{d}\) \(66\)
default \(\frac {-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}+\frac {1}{a^{2} \left (a +b \sin \left (d x +c \right )\right )}+\frac {1}{2 a \left (a +b \sin \left (d x +c \right )\right )^{2}}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a^{3}}}{d}\) \(66\)
risch \(\frac {2 i \left (3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )^{2} a^{2} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d \,a^{3}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d \,a^{3}}\) \(133\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)/(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/a^3*ln(a+b*sin(d*x+c))+1/a^2/(a+b*sin(d*x+c))+1/2/a/(a+b*sin(d*x+c))^2+1/a^3*ln(sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.55, size = 81, normalized size = 1.08 \begin {gather*} \frac {\frac {2 \, b \sin \left (d x + c\right ) + 3 \, a}{a^{2} b^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{3} b \sin \left (d x + c\right ) + a^{4}} - \frac {2 \, \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3}} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a^{3}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*((2*b*sin(d*x + c) + 3*a)/(a^2*b^2*sin(d*x + c)^2 + 2*a^3*b*sin(d*x + c) + a^4) - 2*log(b*sin(d*x + c) + a
)/a^3 + 2*log(sin(d*x + c))/a^3)/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 154 vs. \(2 (73) = 146\).
time = 0.37, size = 154, normalized size = 2.05 \begin {gather*} -\frac {2 \, a b \sin \left (d x + c\right ) + 3 \, a^{2} + 2 \, {\left (b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, {\left (b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right )}{2 \, {\left (a^{3} b^{2} d \cos \left (d x + c\right )^{2} - 2 \, a^{4} b d \sin \left (d x + c\right ) - {\left (a^{5} + a^{3} b^{2}\right )} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/2*(2*a*b*sin(d*x + c) + 3*a^2 + 2*(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)*log(b*sin(d*x + c)
+ a) - 2*(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)*log(-1/2*sin(d*x + c)))/(a^3*b^2*d*cos(d*x + c)
^2 - 2*a^4*b*d*sin(d*x + c) - (a^5 + a^3*b^2)*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot {\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))**3,x)

[Out]

Integral(cot(c + d*x)/(a + b*sin(c + d*x))**3, x)

________________________________________________________________________________________

Giac [A]
time = 13.90, size = 69, normalized size = 0.92 \begin {gather*} -\frac {\frac {2 \, \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3}} - \frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {2 \, a b \sin \left (d x + c\right ) + 3 \, a^{2}}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2} a^{3}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/2*(2*log(abs(b*sin(d*x + c) + a))/a^3 - 2*log(abs(sin(d*x + c)))/a^3 - (2*a*b*sin(d*x + c) + 3*a^2)/((b*sin
(d*x + c) + a)^2*a^3))/d

________________________________________________________________________________________

Mupad [B]
time = 6.54, size = 369, normalized size = 4.92 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{a^3\,d}-\frac {6\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{d\,\left (a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^5+4\,a^4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^4\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+4\,a^3\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {4\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^4+4\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+4\,a^2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{d\,\left (a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^4+4\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+4\,a^2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)/(a + b*sin(c + d*x))^3,x)

[Out]

log(tan(c/2 + (d*x)/2))/(a^3*d) - log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)/(a^3*d) - (6*b^2*ta
n(c/2 + (d*x)/2)^2)/(d*(2*a^5*tan(c/2 + (d*x)/2)^2 + a^5*tan(c/2 + (d*x)/2)^4 + a^5 + 4*a^3*b^2*tan(c/2 + (d*x
)/2)^2 + 4*a^4*b*tan(c/2 + (d*x)/2) + 4*a^4*b*tan(c/2 + (d*x)/2)^3)) - (4*b*tan(c/2 + (d*x)/2))/(d*(2*a^4*tan(
c/2 + (d*x)/2)^2 + a^4*tan(c/2 + (d*x)/2)^4 + a^4 + 4*a^2*b^2*tan(c/2 + (d*x)/2)^2 + 4*a^3*b*tan(c/2 + (d*x)/2
) + 4*a^3*b*tan(c/2 + (d*x)/2)^3)) - (4*b*tan(c/2 + (d*x)/2)^3)/(d*(2*a^4*tan(c/2 + (d*x)/2)^2 + a^4*tan(c/2 +
 (d*x)/2)^4 + a^4 + 4*a^2*b^2*tan(c/2 + (d*x)/2)^2 + 4*a^3*b*tan(c/2 + (d*x)/2) + 4*a^3*b*tan(c/2 + (d*x)/2)^3
))

________________________________________________________________________________________